package com.qzboot.backend.web.module.sys.controller;

import com.qzboot.backend.web.module.sys.BaseSysController;
import com.qzboot.common.support.WebResult;
import com.qzboot.facade.service.SysLogService;
import org.apache.dubbo.config.annotation.Reference;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 系统日志
 *
 * @author zengzhihong
 * @date 2019-12-17
 */
@RestController
@RequestMapping("/sysLog")
public class SysLogController extends BaseSysController {

    @Reference
    private SysLogService sysLogService;

    /**
     * 分页查询
     *
     * @param param
     * @return
     */
    @GetMapping("/listPage")
    @RequiresPermissions("sys:log:list")
    public WebResult listPage(@RequestParam Map<String, Object> param) {
        return WebResult.success(sysLogService.page(param));
    }
}
